package com.ui.basic.dao.assembler;

import java.util.List;

import com.common.basic.base.BaseAssembler;
import com.ui.basic.command.CommandRole;
import com.ui.basic.ibatis.model.system.TblSRole;

public class RoleAssembler implements BaseAssembler<TblSRole, CommandRole> {

	public CommandRole toDto(TblSRole entity) {
		CommandRole dto = new CommandRole();
		dto.setId(entity.getId());
		dto.setRoleName(entity.getRoleName());
		dto.setRoleDesc(entity.getRoleDesc());
		dto.setRoleOrder(entity.getRoleOrder());

		return dto;
	}

	public List<CommandRole> toDtoList(List<TblSRole> listEntity) {
		return null;
	}

	public TblSRole toEntity(CommandRole dto) {
		TblSRole entity = new TblSRole();
		entity.setId(dto.getId());
		entity.setRoleName(dto.getRoleName());
		entity.setRoleDesc(dto.getRoleDesc());
		entity.setRoleOrder(dto.getRoleOrder());
		return entity;
	}

}
